{include file="news/header.tpl"}
{literal}
<script type="text/javascript" language="javascript">  
        $(document).ready(function() {  
        	$("#chk_all").click( 
       			 function(){ 
       				if(this.checked){ 
       				 $("input[name='chk_list']").attr('checked', true) 
       				 }else{ 
       				$("input[name='chk_list']").attr('checked', false) 
       				} 
       				} 
       				);
                  });   
            
          

            function act(name){

                var arrChk=$("input[name='chk_list']:checked");
              	 var ids='';
              	 var cid=$("select[name='category']").val(); 

           if(name=='search'){
           	window.location.href='/news/listing/?type=manage&cid='+cid;         
       return false;
               }
               
                
                var flag=confirm('确认操作?');
                
                if(flag==false){
                    return false;
                }
                var action;
                if(name=="pass"){
                 action="审核通过";
                }else{
                   action="审核不通过";
                 }

                $(arrChk).each(function(){
            	     ids=ids+','+this.value;  
            	     $("#"+this.value+"_pd").html(action);                      
            	  }); 

              	 $.post("/member/setstatus",{ids:ids,cid:cid,type:name},function(data){
                        alert(data.message);  
                      
                        location.reload();
            	 },"json");
        	   
        	  
             }  

            function del(id){  
              if(!confirm("确认删除?")){
                  return;
                 }
          	  $.post("/member/remove",{uid:id},function(data){
          		  $("#member"+id).fadeOut();
               	
                  	//alert(data.message);
             },"json")
          } 
            
            
    </script>

{/literal}

<!-- 头部// -->
<!-- 头部// -->
{include file="news/top.tpl"}


{include file="news/nav.tpl"}
	<!-- start: Content -->
			<div id="content" class="span10">
			
						
			<div class="row-fluid">


<div class="well"><!-- Default panel contents -->


<div class="box-content">
 <form name="news" action="/member/csearch" method="post" class="form-inline">
<input type="checkbox" name="chk_all" id="chk_all" class="checkbox" />{$lang['SELECTALL']}
<input type=button name=copy class="btn btn-success" value="{$lang['PASS']}"
	onclick="act('pass');"> <input type=button name=copy class="btn btn-default"
	value="拒绝" onclick="act('refuse');"> {$lang['TYPE']} <select name="type" class="input-medium">
	<option value="uid">UID</option>
	<option value="username" >{$lang['ACCOUNT']}</option>
	<option value="mobile_phone">{$lang['MOBILE']}</option>
	<option value="real_name" selected>{$lang['USERNAME']}</option>

</select>

<input value="" type="text" name="value" class="input-medium">
 <button type="submit"
	 class="btn btn-primary"> <i class="icon-search"></i>
	 </button> <span class="glyphicon glyphicon-user"></span>	<div class="btn-group">
  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
   {if $verify.name!=""}{$verify.name}{else}{$lang['CHECK']}{/if}
    
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
    <!-- dropdown menu links -->
  {foreach from=$cate item=l key=key} <li><a href="/member/listing/?groupid={$groupid.id}&verify={$key}">{$l}</a></li>{/foreach}
  </ul>
</div>
	 <span class="pull-right text-info">{$totalnum}</span>
</form>
<table class="table table-striped  table-hover">
	<tr>
	<th class="span1"></th>
	<th class="span1">
	
	</th>
	
			<th class="span1">{$lang['ACCOUNT']}</th>
	
		<th class="span1">
		<div class="btn-group">
  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        {if $groupid.name!=""}{$groupid.name}{else}{$lang['GROUP']}{/if}
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
    <!-- dropdown menu links -->
  {foreach from=$group key=key item=l} <li><a href="/member/listing/?groupid={$key}">{$l}</a></li>{/foreach}
  </ul>
</div>
		</th>
		<th class="span1">
		
		
		</th>
		<th class="span2">{$lang['USERNAME']}</th>
		<th class="span2"></th>
		
		<th class="span2"></th>
				<th class="span2">{$lang['LOGINTIME']}</th>
				<th class="span1"></th>
		
	</tr>




	{section name=l loop=$news }
	<tr id="member{$news[l].uid}">
		<td><input type=checkbox
			name=chk_list value="{$news[l].uid}"></td><td>
			
			{if
		$news[l].verify=="尚未认证"}<span class="label label-info"><i class="icon-time"></i></span>{elseif $news[l].verify=="不通过"}<span class="label"><i class="icon-ban-circle"></i>{else}{/if}
			
			
			</td>
			<td>
			<a href="/member/edit/?id={$news[l].uid}" target="_blank">{$news[l].username}</a></td>

		

		
		<td id="{$news[l].uid}_realname">{$news[l].name} </td>

		<td id="{$news[l].id}_realname">
		
			{if $news[l].face==""}<img src="/static/attached/face/default_01.jpg"  class="avatar-small">{else}<img src="{$news[l].face}"  class="avatar-small">{/if}
		</td>
		<td id="{$news[l].uid}_real_name">{$news[l].real_name}{if $news[l].status=='离职'}
			<span class="label">离职</span>{/if}</td>
		<td><span id="{$news[l].uid}_sj">{$news[l].mobile_phone}</span></td>
		
		<td id="{$news[l].uid}_address">{$news[l].area}</td>
		<td>{$news[l].lastlogin|wtime}</td>
<td> <a href="javascript:del({$news[l].uid})">x</a></td>
	</tr>
	{/section}

</table>

<div class="pagination pagination-centered">
<ul id="pager"></ul></div>

</div>




</div>


{literal}
<script type='text/javascript'>
var options = {
currentPage: {/literal}{$num.current}{literal},
totalPages: {/literal}{$num.page}{literal},
numberOfPages:5,
bootstrapMajorVersion:3,
pageUrl: function(type, page, current){
    return '/member/listing/?groupid={/literal}{$groupid.id}&verify={$verify.id}&{literal}&p='+page;
}
}
$('#pager').bootstrapPaginator(options);
</script>
{/literal}
{include file="news/footer.tpl"}
